package home.control;

import home.control.service.AlarmCheck;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public  class AlarmActivity extends Activity implements OnClickListener{ 
	
	private Button callPoliceBT;
	private Button dismisBT;
	
	public static final String ALARM = "home.control.alarmIntent.ALARM";
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.alaramlayout);
		
		callPoliceBT = (Button) findViewById(R.id.callPoliceBT);
		dismisBT = (Button) findViewById(R.id.dismisAlaramBT);
		
		callPoliceBT.setOnClickListener(this);
		dismisBT.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		switch(v.getId()){
		case R.id.callPoliceBT:{
			Intent i = new Intent(Intent.ACTION_CALL);
			i.setData(Uri.parse("tel:112"));
			startActivity(i);
			break;
		}
		case R.id.dismisAlaramBT:{
			finish();
			break;
		}
		}
	}
	
	@Override
	protected void onStop() {
		super.onPause();
	}

}
